package com.edu.zql;

import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;

/**
 * Created by User on 2017/8/25.
 */
public enum Person {

    a, b;




    public void a() throws IllegalAccessException, InstantiationException {


        System.out.println("static");
    }
    public void c() {
        try {
            Constructor<Person> declaredConstructor = Person.class.getDeclaredConstructor(String.class, int.class);
            Person a = declaredConstructor.newInstance("a", 1);
            a.a();
        } catch (InstantiationException e) {
            e.printStackTrace();
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        } catch (NoSuchMethodException e) {
            e.printStackTrace();
        } catch (InvocationTargetException e) {
            e.printStackTrace();
        }

        System.out.println("sada");
    }




}
